#include<stdio.h>
int main(void) 
{
	int n;
	int factorial(int n);
	
	scanf("%d",&n);
	printf("%d\n",factorial(n));
	
	return 0;
}
    int factorial(int n){
	
    int i,f;
    
    f=1;
    for(i=1;i<=n;i++){
	f=f*i;

	}
	
	return f;
}
